home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 4
/
CU Amiga Magazine's Super CD-ROM 04 (1996)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1996-11].iso
/
magazine
/
psion
/
apps2
/
biostuff.lzx
/
tme.opl
< prev
Wrap
Text File
|
1986-05-23
|
879b
|
64 lines
proc TIMEAD:
LOCAL A1,B1,C1,D1,E1,F1,G1,H1,KEY%
ESCAPE ON
TOP::
CLS
PRINT"Hr";CHR$(63)
INPUT A1
PRINT "Min";CHR$(63)
INPUT B1
PRINT "Sec";CHR$(63)
INPUT C1
D1=D1+A1
E1=E1+B1
F1=F1+C1
IF F1>59 OR F1<0
GOTO SEC::
ELSEIF E1>59 OR E1<0
GOTO MIN::
ENDIF
ASK::
CLS
IF F1<10 AND E1<10
PRINT D1;"h 0";E1;"m 0";F1;"s"
ELSEIF F1<10
PRINT D1;"h ";E1;"m 0";F1;"s"
ELSEIF E1<10
PRINT D1;"h 0";E1;"m ";F1;"s"
ELSE PRINT D1;"h ";E1;"m ";F1;"s"
ENDIF
PRINT " Add(Y/N)";CHR$(63)
KEY%=GET
IF KEY%=%n
RETURN
ELSEIF KEY%=%y
GOTO TOP::
ELSE GOTO ASK::
ENDIF
SEC::
IF F1>59
G1=INTF(F1/60)
F1=F1-(60*G1)
E1=E1+G1
ELSEIF F1<0
G1=1+(INTF(ABS(F1/60)))
F1=F1+(60*G1)
E1=E1-G1
ENDIF
MIN::
IF E1>59
H1=INTF(E1/60)
E1=E1-(60*H1)
D1=D1+H1
ELSEIF E1<0
H1=1+(INTF(ABS(E1/60)))
E1=E1+(H1*60)
D1=D1-H1
ENDIF
GOTO ASK::
endp